<?php

class PlanningSearchForm extends sfForm
{
    public function configure()
    {
        $this->setWidgets( array (
            'title'   => new sfWidgetFormInput(),
            'importance' => new sfWidgetFormInput(),
            'notes' => new sfWidgetFormTextarea(),
            'due_date' => new sfWidgetFormRichDate()
        ));
        
        $this->setValidators(array (
            'title'   => new sfValidatorString(array('max_length' => 127)),
            'importance' => new sfValidatorNumber(array('max' => 99, 'min' => 0, 'required' => false)),
            'notes' => new sfValidatorString(array('max_length' => 1000, 'required' => false)),
            'due_date' => new sfValidatorDate()
        ));

        $this->widgetSchema->setNameFormat('searchForm[%s]');
    }
}

?>
